﻿@using Abp.Application.Editions
@using Abp.Extensions
@using MyCompanyName.AbpZeroTemplate.Web.Areas.AppAreaName.Models.Common.Modals
@using MyCompanyName.AbpZeroTemplate.Web.Areas.AppAreaName.Models.Editions
@model EditEditionModalViewModel

@await Html.PartialAsync("~/Areas/AppAreaName/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(L("EditEdition") + ": " + Model.Edition.DisplayName))

<div class="modal-body">

    <ul class="nav nav-tabs" role="tablist">
        <li class="nav-item">
            <a href="#EditionInformationsTab" class="nav-link active" data-toggle="tab" role="tab">
                @L("EditionProperties")
            </a>
        </li>
        <li class="nav-item">
            <a href="#FeaturesTab" class="nav-link" data-toggle="tab" role="tab">
                @L("Features")
            </a>
        </li>
    </ul>

    <div class="tab-content">
        <div class="tab-pane active" id="EditionInformationsTab" role="tabpanel">

            <form name="EditionInformationsForm" role="form" novalidate class="form-validation">

                <input type="hidden" name="Id" value="@Model.Edition.Id" />

                <div class="form-group ">
                    <label for="DisplayName">@L("EditionName")</label>
                    <input class="form-control@(Model.Edition.DisplayName.IsNullOrEmpty() ? "" : " edited")"
                           type="text"
                           name="DisplayName"
                           id="DisplayName"
                           value="@Model.Edition.DisplayName"
                           required
                           maxlength="@Edition.MaxDisplayNameLength">
                </div>

            </form>

        </div>
        <div class="tab-pane" id="FeaturesTab" role="tabpanel">
            @await Html.PartialAsync("~/Areas/AppAreaName/Views/Common/_FeaturesTree.cshtml", Model)
        </div>
    </div>
</div>

@await Html.PartialAsync("~/Areas/AppAreaName/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")